<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Histogram equalization</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Histogram_equalization"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Histogram_equalization rootpage-Histogram_equalization skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Histogram equalization</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p class="mw-empty-elt">
</p>
<p><b>Histogram equalization</b> is a method in <a href="Image_processing" class="mw-redirect" title="Image processing">image processing</a> of <a href="Contrast_(vision)" title="Contrast (vision)">contrast</a> adjustment using the <a href="Image_histogram" title="Image histogram">image's histogram</a>.
</p><p>Histogram equalization is a specific case of the more general class of histogram remapping methods. These methods seek to adjust the image to make it easier to analyze or improve visual quality (e.g., <a href="Retinex" class="mw-redirect" title="Retinex">retinex</a>).
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Overview">Overview</h2></div>
<p>This method usually increases the global contrast of many images, especially when the image is represented by a narrow range of intensity values. Through this adjustment, the <a href="Luminous_intensity" title="Luminous intensity">intensities</a> can be better distributed on the histogram utilizing the full range of intensities evenly. This allows for areas of lower local contrast to gain a higher contrast. Histogram equalization accomplishes this by effectively spreading out the highly populated intensity values, which tend to degrade image contrast.
</p><p>The method is useful in images with backgrounds and foregrounds that are both bright or both dark. In particular, the method can lead to better views of <a href="Bone" title="Bone">bone</a> structure in <a href="X-ray" title="X-ray">x-ray</a> images and to better detail in <a href="Photograph" title="Photograph">photographs</a> that are either over or under-exposed. A key advantage of the method is that it is a fairly straightforward technique adaptive to the input image and an <a href="Invertible_operation" class="mw-redirect" title="Invertible operation">invertible operation</a>. So, in theory, if the histogram equalization <a href="Function_(mathematics)" title="Function (mathematics)">function</a> is known, then the original histogram can be recovered. The calculation is not <a href="Computation" title="Computation">computationally</a> intensive. A disadvantage of the method is that it is indiscriminate. It may increase the contrast of background <a href="Signal_noise" class="mw-redirect" title="Signal noise">noise</a>, while decreasing the usable <a href="Signal" title="Signal">signal</a>. In scientific imaging where spatial correlation is more important than intensity of signal (such as separating <a href="DNA" title="DNA">DNA</a> fragments of quantized length), the small <a href="Signal-to-noise_ratio" title="Signal-to-noise ratio">signal-to-noise ratio</a> usually hampers visual detections.
</p><p>Histogram equalization often produces unrealistic effects in photographs; however it is very useful for scientific images like <a href="Thermography" title="Thermography">thermal</a>, <a href="Satellite" title="Satellite">satellite</a> or <a href="X-ray" title="X-ray">x-ray</a> images, often the same class of images to which one would apply <a href="False-color" class="mw-redirect" title="False-color">false-color</a>. Also histogram equalization can produce undesirable effects (like visible <a href="Image_gradient" title="Image gradient">image gradient</a>) when applied to images with low <a href="Color_depth" title="Color depth">color depth</a>. For example, if applied to 8-bit image displayed with <a href="List_of_8-bit_computer_hardware_palettes" class="mw-redirect" title="List of 8-bit computer hardware palettes">8-bit gray-scale palette</a> it will further reduce <a href="Color_depth" title="Color depth">color depth</a> (number of unique shades of gray) of the image. Histogram equalization will work the best when applied to images with much higher <a href="Color_depth" title="Color depth">color depth</a> than <a href="Palette_(computing)" title="Palette (computing)">palette</a> size, like <a href="Continuous_function" title="Continuous function">continuous</a> data or 16-bit gray-scale images.
</p><p>There are two ways to think about and implement histogram equalization, either as image change or as <a href="Palette_(computing)" title="Palette (computing)">palette</a> change. The operation can be expressed as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(M(I))}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo stretchy="false">(</mo>
<mi>I</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P(M(I))}</annotation>
</semantics>
</math></span><img src="./7ac8397dfa9c1199de24eeaeac80384c872f21af.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.978ex; height:2.843ex;" alt="{\displaystyle P(M(I))}" loading="lazy"></span> where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle I}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>I</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle I}</annotation>
</semantics>
</math></span><img src="./535ea7fc4134a31cbe2251d9d3511374bc41be9f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.172ex; height:2.176ex;" alt="{\displaystyle I}" loading="lazy"></span> is the original image, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>M</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle M}</annotation>
</semantics>
</math></span><img src="./f82cade9898ced02fdd08712e5f0c0151758a0dd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.442ex; height:2.176ex;" alt="{\displaystyle M}" loading="lazy"></span> is histogram equalization mapping operation and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P}</annotation>
</semantics>
</math></span><img src="./b4dc73bf40314945ff376bd363916a738548d40a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.745ex; height:2.176ex;" alt="{\displaystyle P}" loading="lazy"></span> is a palette. If we define a new palette as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P'=P(M)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>P</mi>
<mo>′</mo>
</msup>
<mo>=</mo>
<mi>P</mi>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P'=P(M)}</annotation>
</semantics>
</math></span><img src="./2cbb61d7dce3b9e061da2a545f963e8feaf8a1e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.602ex; height:3.009ex;" alt="{\displaystyle P'=P(M)}" loading="lazy"></span> and leave image <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle I}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>I</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle I}</annotation>
</semantics>
</math></span><img src="./535ea7fc4134a31cbe2251d9d3511374bc41be9f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.172ex; height:2.176ex;" alt="{\displaystyle I}" loading="lazy"></span></i> unchanged then histogram equalization is implemented as <a href="Palette_(computing)" title="Palette (computing)">palette</a> change or mapping change. On the other hand, if palette <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P}</annotation>
</semantics>
</math></span><img src="./b4dc73bf40314945ff376bd363916a738548d40a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.745ex; height:2.176ex;" alt="{\displaystyle P}" loading="lazy"></span> remains unchanged and image is modified to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle I'=M(I)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>I</mi>
<mo>′</mo>
</msup>
<mo>=</mo>
<mi>M</mi>
<mo stretchy="false">(</mo>
<mi>I</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle I'=M(I)}</annotation>
</semantics>
</math></span><img src="./886a083d628b41da73f174a6dfb3457c88e640e8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.423ex; height:3.009ex;" alt="{\displaystyle I'=M(I)}" loading="lazy"></span> then the implementation is accomplished by image change. In most cases palette change is preferred as it preserves the original data.
</p><p>Modifications of this method use multiple histograms, called subhistograms, to emphasize local contrast rather than overall global contrast. Examples of such methods include <a href="Adaptive_histogram_equalization" title="Adaptive histogram equalization">adaptive histogram equalization</a> and variations including, contrast limited adaptive histogram equalization, multipeak histogram equalization, and multipurpose beta-optimized bihistogram equalization (MBOBHE). The goal of these methods, especially MBOBHE, is to modifying the algorithm to improve the contrast without producing brightness mean-shift and detail loss artifacts.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>A signal transform equivalent to histogram equalization also seems to happen in <a href="Biological_neural_networks" class="mw-redirect" title="Biological neural networks">biological neural networks</a> so as to maximize the output firing rate of the neuron as a function of the input statistics. This has been proved in particular in the <a href="Fly" title="Fly">fly</a> <a href="Retina" title="Retina">retina</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Back_projection">Back projection</h3></div>
<p>The <i>back projection</i> of a histogrammed image is the re-application of the modified histogram to the original image, functioning as a look-up table for pixel brightness values.
</p><p>For each group of pixels taken from the same position from all input single-channel images, the function puts the histogram bin value to the destination image, where the coordinates of the bin are determined by the values of pixels in this input group. In terms of statistics, the value of each output image pixel characterizes the probability that the corresponding input pixel group belongs to the object whose histogram is used.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Implementation">Implementation</h2></div>
<p>Consider a discrete <a href="Grayscale_image" class="mw-redirect" title="Grayscale image">grayscale image</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>X</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle X}</annotation>
</semantics>
</math></span><img src="./68baa052181f707c662844a465bfeeb135e82bab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.98ex; height:2.176ex;" alt="{\displaystyle X}" loading="lazy"></span> and let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>n</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n_{i}}</annotation>
</semantics>
</math></span><img src="./57f87f905ba5a4d8c691ccaecd65fc47bd007ba4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.194ex; height:2.009ex;" alt="{\displaystyle n_{i}}" loading="lazy"></span> be the number of occurrences of gray level <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span>. The probability of a pixel value chosen uniformly randomly from image <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>X</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle X}</annotation>
</semantics>
</math></span><img src="./68baa052181f707c662844a465bfeeb135e82bab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.98ex; height:2.176ex;" alt="{\displaystyle X}" loading="lazy"></span> being <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span></i>, is
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ p_{X}(i)={\frac {n_{i}}{n}},\quad 0\leq i<L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<msub>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>X</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msub>
<mi>n</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mi>n</mi>
</mfrac>
</mrow>
<mo>,</mo>
<mspace width="1em"></mspace>
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>i</mi>
<mo><</mo>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ p_{X}(i)={\frac {n_{i}}{n}},\quad 0\leq i<L}</annotation>
</semantics>
</math></span><img src="./925b0758b96cf56d54ece344133f79276d44ab8e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:25.224ex; height:4.676ex;" alt="{\displaystyle \ p_{X}(i)={\frac {n_{i}}{n}},\quad 0\leq i<L}" loading="lazy"></span></dd></dl>
<p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle L}</annotation>
</semantics>
</math></span><img src="./103168b86f781fe6e9a4a87b8ea1cebe0ad4ede8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.583ex; height:2.176ex;" alt="{\displaystyle L}" loading="lazy"></span> being the total number of gray levels in the image, <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>n</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n_{i}}</annotation>
</semantics>
</math></span><img src="./57f87f905ba5a4d8c691ccaecd65fc47bd007ba4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.194ex; height:2.009ex;" alt="{\displaystyle n_{i}}" loading="lazy"></span></i> being the number of pixels in the image with value <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span></i>, and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n}</annotation>
</semantics>
</math></span><img src="./a601995d55609f2d9f5e233e36fbe9ea26011b3b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="{\displaystyle n}" loading="lazy"></span> being the total number of pixels in the image. Then <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{X}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>X</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p_{X}(i)}</annotation>
</semantics>
</math></span><img src="./136a26ab9730593180b8a636bf9e5fc0e57ec0fc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:5.503ex; height:2.843ex;" alt="{\displaystyle p_{X}(i)}" loading="lazy"></span> is the image's histogram value for <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span></i>, with the histogram normalized to have a total area of 1.
</p><p>Let us then define the <i><a href="Cumulative_distribution_function" title="Cumulative distribution function">cumulative distribution function</a></i> of pixels in image <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>X</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle X}</annotation>
</semantics>
</math></span><img src="./68baa052181f707c662844a465bfeeb135e82bab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.98ex; height:2.176ex;" alt="{\displaystyle X}" loading="lazy"></span></i>. For value <i><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span></i> it is
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {cdf} _{X}(i)=\sum _{j=0}^{i}p_{X}(j)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>cdf</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>X</mi>
</mrow>
</msub>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</munderover>
<msub>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>X</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>j</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {cdf} _{X}(i)=\sum _{j=0}^{i}p_{X}(j)}</annotation>
</semantics>
</math></span><img src="./dd0226bb34292b89c434e8dfd19c4b653b0a6e10.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.338ex; width:19.691ex; height:7.509ex;" alt="{\displaystyle \operatorname {cdf} _{X}(i)=\sum _{j=0}^{i}p_{X}(j)}" loading="lazy"></span>,</dd></dl>
<p>which is also the image's accumulated normalized histogram.
</p><p>We would like to create a transformation <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle T:[0,L-1]\rightarrow [0,L-1]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>T</mi>
<mo>:</mo>
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">]</mo>
<mo stretchy="false">→<!-- → --></mo>
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle T:[0,L-1]\rightarrow [0,L-1]}</annotation>
</semantics>
</math></span><img src="./5932b9eb3939aacf5b173bac6265a856662fd1bf.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:25.339ex; height:2.843ex;" alt="{\displaystyle T:[0,L-1]\rightarrow [0,L-1]}" loading="lazy"></span> to produce a new image <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>y</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle y}</annotation>
</semantics>
</math></span><img src="./b8a6208ec717213d4317e666f1ae872e00620a0d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}" loading="lazy"></span>, with a flat histogram. Such an image would have a linearized cumulative distribution function (CDF) across the value range, i.e.
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {cdf} _{Y}(i)=(i+1)K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>cdf</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>Y</mi>
</mrow>
</msub>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {cdf} _{Y}(i)=(i+1)K}</annotation>
</semantics>
</math></span><img src="./4c60363235e9ea3adccb6fd6383210eb98607c68.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.914ex; height:2.843ex;" alt="{\displaystyle \operatorname {cdf} _{Y}(i)=(i+1)K}" loading="lazy"></span> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq i<L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>i</mi>
<mo><</mo>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0\leq i<L}</annotation>
</semantics>
</math></span><img src="./7c8e93f13cf4adb1f905e5f7804125edce10d559.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.745ex; height:2.343ex;" alt="{\displaystyle 0\leq i<L}" loading="lazy"></span></dd></dl>
<p>for some constant <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K}</annotation>
</semantics>
</math></span><img src="./2b76fce82a62ed5461908f0dc8f037de4e3686b0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.066ex; height:2.176ex;" alt="{\displaystyle K}" loading="lazy"></span>. The properties of the CDF allow us to perform such a transform (see <a href="Cumulative_distribution_function#Inverse_distribution_function_(quantile_function)" title="Cumulative distribution function">Inverse distribution function</a>). It is defined as
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ T(i)=\operatorname {cdf} _{X}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<mi>T</mi>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<msub>
<mi>cdf</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>X</mi>
</mrow>
</msub>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ T(i)=\operatorname {cdf} _{X}(i)}</annotation>
</semantics>
</math></span><img src="./627221fa58b696ca58244e8f513f695aafb35f32.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.208ex; height:2.843ex;" alt="{\displaystyle \ T(i)=\operatorname {cdf} _{X}(i)}" loading="lazy"></span></dd></dl>
<p>where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ i}</annotation>
</semantics>
</math></span><img src="./bc8d2dfe9ddfc5489e5ce676d223cc41a9489763.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.383ex; height:2.176ex;" alt="{\displaystyle \ i}" loading="lazy"></span> is in the range <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [0,L-1]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [0,L-1]}</annotation>
</semantics>
</math></span><img src="./519ec65a9436d3a0094d9c7df1fb388723f0098f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.076ex; height:2.843ex;" alt="{\displaystyle [0,L-1]}" loading="lazy"></span>. Notice that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ T}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<mi>T</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ T}</annotation>
</semantics>
</math></span><img src="./630996e0f4ea15c1347439ec69ac78fc5ae2f755.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.217ex; height:2.176ex;" alt="{\displaystyle \ T}" loading="lazy"></span> maps the levels into the range <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [0,1]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mn>1</mn>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [0,1]}</annotation>
</semantics>
</math></span><img src="./738f7d23bb2d9642bab520020873cccbef49768d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.653ex; height:2.843ex;" alt="{\displaystyle [0,1]}" loading="lazy"></span>, since we used a normalized histogram of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>X</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle X}</annotation>
</semantics>
</math></span><img src="./68baa052181f707c662844a465bfeeb135e82bab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.98ex; height:2.176ex;" alt="{\displaystyle X}" loading="lazy"></span>. In order to map the values back into their original range, the following simple transformation needs to be applied to each transformed image value <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span>:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ k^{\prime }=k\cdot (\max(i)-\min(i))+\min(i)=k\cdot (L-1)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mi>k</mi>
<mo>⋅<!-- ⋅ --></mo>
<mo stretchy="false">(</mo>
<mo movablelimits="true" form="prefix">max</mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mo movablelimits="true" form="prefix">min</mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
<mo>+</mo>
<mo movablelimits="true" form="prefix">min</mo>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>k</mi>
<mo>⋅<!-- ⋅ --></mo>
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ k^{\prime }=k\cdot (\max(i)-\min(i))+\min(i)=k\cdot (L-1)}</annotation>
</semantics>
</math></span><img src="./526c4eb8beb53ae1cc7d864b6a7e5aca0e24fcce.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:49.251ex; height:3.009ex;" alt="{\displaystyle \ k^{\prime }=k\cdot (\max(i)-\min(i))+\min(i)=k\cdot (L-1)}" loading="lazy"></span><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></dd></dl>
<p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> is a real value while<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ k^{\prime }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ k^{\prime }}</annotation>
</semantics>
</math></span><img src="./9a75fc60a92cd4cb21343e289a32f9b9978fc74b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.477ex; height:2.509ex;" alt="{\displaystyle \ k^{\prime }}" loading="lazy"></span> has to be an integer. An intuitive and popular method<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> is applying the round operation:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ k^{\prime }=\operatorname {round} (k\cdot (L-1))}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mtext> </mtext>
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mi>round</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>k</mi>
<mo>⋅<!-- ⋅ --></mo>
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \ k^{\prime }=\operatorname {round} (k\cdot (L-1))}</annotation>
</semantics>
</math></span><img src="./77f95a3f25dba1ebe65c7c32de078d29ac114dc8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:23.621ex; height:3.009ex;" alt="{\displaystyle \ k^{\prime }=\operatorname {round} (k\cdot (L-1))}" loading="lazy"></span>.</dd></dl>
<p>However, detailed analysis results in slightly different formulation. The mapped value <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }}</annotation>
</semantics>
</math></span><img src="./3b43b207c13b82ee7555c77f8128366b2fa46bf8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.896ex; height:2.509ex;" alt="{\displaystyle k^{\prime }}" loading="lazy"></span> should be 0 for the range of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0<k\leq 1/L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mo><</mo>
<mi>k</mi>
<mo>≤<!-- ≤ --></mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0<k\leq 1/L}</annotation>
</semantics>
</math></span><img src="./8e5c9db0439517ae204698d47d64c6c7036c24d3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.478ex; height:2.843ex;" alt="{\displaystyle 0<k\leq 1/L}" loading="lazy"></span>. And <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }=1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }=1}</annotation>
</semantics>
</math></span><img src="./1661bab61a3f4cab27363752156c9c22a8a74ed2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.157ex; height:2.509ex;" alt="{\displaystyle k^{\prime }=1}" loading="lazy"></span> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1/L<k\leq 2/L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
<mo><</mo>
<mi>k</mi>
<mo>≤<!-- ≤ --></mo>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 1/L<k\leq 2/L}</annotation>
</semantics>
</math></span><img src="./6297b2a4f7a0b3ac0fc63f4af5216ab795e10cbe.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.224ex; height:2.843ex;" alt="{\displaystyle 1/L<k\leq 2/L}" loading="lazy"></span>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }=2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }=2}</annotation>
</semantics>
</math></span><img src="./3d585efcfd9e1a74c81224e264edff2d2c325968.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.157ex; height:2.509ex;" alt="{\displaystyle k^{\prime }=2}" loading="lazy"></span> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2/L<k\leq 3/L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
<mo><</mo>
<mi>k</mi>
<mo>≤<!-- ≤ --></mo>
<mn>3</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2/L<k\leq 3/L}</annotation>
</semantics>
</math></span><img src="./033423ce8f28a951b0ea6cdd312e9a4abd1e96ee.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.224ex; height:2.843ex;" alt="{\displaystyle 2/L<k\leq 3/L}" loading="lazy"></span>, ...., and finally <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }=L-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }=L-1}</annotation>
</semantics>
</math></span><img src="./fe49ec6ed86f1cfaaf2a027c90036a7876591ffc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:10.58ex; height:2.676ex;" alt="{\displaystyle k^{\prime }=L-1}" loading="lazy"></span> for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (L-1)/L<k\leq 1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>L</mi>
<mo><</mo>
<mi>k</mi>
<mo>≤<!-- ≤ --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (L-1)/L<k\leq 1}</annotation>
</semantics>
</math></span><img src="./ad58b465e490862a3878ec76841ac34f95e484a6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.711ex; height:2.843ex;" alt="{\displaystyle (L-1)/L<k\leq 1}" loading="lazy"></span>. Then the quantization formula from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }}</annotation>
</semantics>
</math></span><img src="./3b43b207c13b82ee7555c77f8128366b2fa46bf8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.896ex; height:2.509ex;" alt="{\displaystyle k^{\prime }}" loading="lazy"></span> should be
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }=\operatorname {ceil} (L\cdot k)-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mi>ceil</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>⋅<!-- ⋅ --></mo>
<mi>k</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }=\operatorname {ceil} (L\cdot k)-1}</annotation>
</semantics>
</math></span><img src="./12b4f7d46c3e29ba9687d77cce14ecc7489baa7d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.638ex; height:3.009ex;" alt="{\displaystyle k^{\prime }=\operatorname {ceil} (L\cdot k)-1}" loading="lazy"></span>.
</p><p>(Note: <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k^{\prime }=-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi class="MJX-variant" mathvariant="normal">′<!-- ′ --></mi>
</mrow>
</msup>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k^{\prime }=-1}</annotation>
</semantics>
</math></span><img src="./958ba37a4307cc6812d656b743d83053e4468ebd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:7.965ex; height:2.676ex;" alt="{\displaystyle k^{\prime }=-1}" loading="lazy"></span> when <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k=0}</annotation>
</semantics>
</math></span><img src="./6307c8a99dad7d0bcb712352ae0a748bd99a038b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.472ex; height:2.176ex;" alt="{\displaystyle k=0}" loading="lazy"></span>, however, it does not happen just because <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k=0}</annotation>
</semantics>
</math></span><img src="./6307c8a99dad7d0bcb712352ae0a748bd99a038b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.472ex; height:2.176ex;" alt="{\displaystyle k=0}" loading="lazy"></span> means that there is no pixel corresponding to that value.)
</p>
<div class="mw-heading mw-heading2"><h2 id="On_color_images">On color images</h2></div>
<p>The above-described histogram equalization works on a grayscale image. It can also be used on color images. One option is applying the method separately to the red, green and blue components of the <a href="RGB" class="mw-redirect" title="RGB">RGB</a> color values of the image, which likely produces dramatic changes in the image's <a href="Color_balance" title="Color balance">color balance</a> since the relative distributions of the color channels change as a result of applying the algorithm. However, if the image is first converted to another color space, <a href="Lab_color_space" class="mw-redirect" title="Lab color space">Lab</a>, or <a href="HSL_and_HSV" title="HSL and HSV">HSL/HSV</a> in particular, then the algorithm can be applied to the <a href="Luminance" title="Luminance">luminance</a> or value channel without resulting in changes to color properties of the image.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p><p>There are several histogram equalization methods in 3D space<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> which result in "whitening" where the probability of bright pixels are higher than that of dark ones.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> Han et al. proposed to use a new CDF defined by the ISO-luminance plane, which results in uniform gray distribution.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<p>For consistency with <a href="Statistical" class="mw-redirect" title="Statistical">statistical</a> usage, "CDF" (i.e. Cumulative distribution function) should be replaced by "cumulative histogram", especially since the article links to <a href="Cumulative_distribution_function" title="Cumulative distribution function">cumulative distribution function</a> which is derived by dividing values in the cumulative histogram by the overall amount of pixels. The equalized CDF is defined in terms of <a href="Ranking" title="Ranking">rank</a> as <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle rank/pixelcount}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mi>a</mi>
<mi>n</mi>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mi>p</mi>
<mi>i</mi>
<mi>x</mi>
<mi>e</mi>
<mi>l</mi>
<mi>c</mi>
<mi>o</mi>
<mi>u</mi>
<mi>n</mi>
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle rank/pixelcount}</annotation>
</semantics>
</math></span><img src="./863fc1448586da5a102454dcab1781ad784f9641.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.824ex; height:2.843ex;" alt="{\displaystyle rank/pixelcount}" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Small_image">Small image</h3></div>
<p>The 8-bit grayscale image shown has the following values:
</p>
<table class="wikitable">
<tbody><tr>
<th style="background-color:#343434; color:#ffffff;">52
</th>
<th style="background-color:#373737; color:#ffffff;">55
</th>
<th style="background-color:#3d3d3d; color:#ffffff;">61
</th>
<th style="background-color:#3b3b3b; color:#ffffff;">59
</th>
<th style="background-color:#464646; color:#ffffff;">79
</th>
<th style="background-color:#3d3d3d; color:#ffffff;">61
</th>
<th style="background-color:#4c4c4c; color:#ffffff;">76
</th>
<th style="background-color:#3d3d3d; color:#ffffff;">61
</th></tr>
<tr>
<td style="background-color:#3e3e3e; color:#ffffff;">62
</td>
<td style="background-color:#3b3b3b; color:#ffffff;">59
</td>
<td style="background-color:#373737; color:#ffffff;">55
</td>
<td style="background-color:#686868; color:#ffffff;">104
</td>
<td style="background-color:#5e5e5e; color:#ffffff;">94
</td>
<td style="background-color:#555555; color:#ffffff;">85
</td>
<td style="background-color:#3b3b3b; color:#ffffff;">59
</td>
<td style="background-color:#474747; color:#ffffff;">71
</td></tr>
<tr>
<td style="background-color:#3f3f3f; color:#ffffff;">63
</td>
<td style="background-color:#414141; color:#ffffff;">65
</td>
<td style="background-color:#424242; color:#ffffff;">66
</td>
<td style="background-color:#717171; color:#ffffff;">113
</td>
<td style="background-color:#909090; color:#000000;">144
</td>
<td style="background-color:#686868; color:#ffffff;">104
</td>
<td style="background-color:#3f3f3f; color:#ffffff;">63
</td>
<td style="background-color:#484848; color:#ffffff;">72
</td></tr>
<tr>
<td style="background-color:#404040; color:#ffffff;">64
</td>
<td style="background-color:#464646; color:#ffffff;">70
</td>
<td style="background-color:#464646; color:#ffffff;">70
</td>
<td style="background-color:#7e7e7e; color:#ffffff;">126
</td>
<td style="background-color:#9a9a9a; color:#000000;">154
</td>
<td style="background-color:#6d6d6d; color:#ffffff;">109
</td>
<td style="background-color:#474747; color:#ffffff;">71
</td>
<td style="background-color:#454545; color:#ffffff;">69
</td></tr>
<tr>
<td style="background-color:#434343; color:#ffffff;">67
</td>
<td style="background-color:#494949; color:#ffffff;">73
</td>
<td style="background-color:#444444; color:#ffffff;">68
</td>
<td style="background-color:#6a6a6a; color:#ffffff;">106
</td>
<td style="background-color:#7a7a7a; color:#ffffff;">122
</td>
<td style="background-color:#585858; color:#ffffff;">88
</td>
<td style="background-color:#444444; color:#ffffff;">68
</td>
<td style="background-color:#444444; color:#ffffff;">68
</td></tr>
<tr>
<td style="background-color:#444444; color:#ffffff;">68
</td>
<td style="background-color:#4f4f4f; color:#ffffff;">79
</td>
<td style="background-color:#3c3c3c; color:#ffffff;">60
</td>
<td style="background-color:#464646; color:#ffffff;">70
</td>
<td style="background-color:#4d4d4d; color:#ffffff;">77
</td>
<td style="background-color:#424242; color:#ffffff;">66
</td>
<td style="background-color:#3a3a3a; color:#ffffff;">58
</td>
<td style="background-color:#4b4b4b; color:#ffffff;">75
</td></tr>
<tr>
<td style="background-color:#454545; color:#ffffff;">69
</td>
<td style="background-color:#555555; color:#ffffff;">85
</td>
<td style="background-color:#404040; color:#ffffff;">64
</td>
<td style="background-color:#3a3a3a; color:#ffffff;">58
</td>
<td style="background-color:#373737; color:#ffffff;">55
</td>
<td style="background-color:#3d3d3d; color:#ffffff;">61
</td>
<td style="background-color:#414141; color:#ffffff;">65
</td>
<td style="background-color:#535353; color:#ffffff;">83
</td></tr>
<tr>
<td style="background-color:#464646; color:#ffffff;">70
</td>
<td style="background-color:#575757; color:#ffffff;">87
</td>
<td style="background-color:#454545; color:#ffffff;">69
</td>
<td style="background-color:#444444; color:#ffffff;">68
</td>
<td style="background-color:#414141; color:#ffffff;">65
</td>
<td style="background-color:#494949; color:#ffffff;">73
</td>
<td style="background-color:#4e4e4e; color:#ffffff;">78
</td>
<td style="background-color:#5a5a5a; color:#ffffff;">90
</td></tr></tbody></table>
<p>The histogram for this image is shown in the following table. Pixel values that have a zero count are excluded for the sake of brevity.
</p>
<dl><dd><table class="wikitable">
<tbody><tr>
<th>Value</th>
<th>Count
</th>
<th>Value</th>
<th>Count
</th>
<th>Value</th>
<th>Count
</th>
<th>Value</th>
<th>Count
</th>
<th>Value</th>
<th>Count
</th></tr>
<tr>
<td>52</td>
<td>1
</td>
<td>64</td>
<td>2
</td>
<td>72</td>
<td>1
</td>
<td>85</td>
<td>2
</td>
<td>113</td>
<td>1
</td></tr>
<tr>
<td>55</td>
<td>3
</td>
<td>65</td>
<td>3
</td>
<td>73</td>
<td>2
</td>
<td>87</td>
<td>1
</td>
<td>122</td>
<td>1
</td></tr>
<tr>
<td>58</td>
<td>2
</td>
<td>66</td>
<td>2
</td>
<td>75</td>
<td>1
</td>
<td>88</td>
<td>1
</td>
<td>126</td>
<td>1
</td></tr>
<tr>
<td>59</td>
<td>3
</td>
<td>67</td>
<td>1
</td>
<td>76</td>
<td>1
</td>
<td>90</td>
<td>1
</td>
<td>144</td>
<td>1
</td></tr>
<tr>
<td>60</td>
<td>1
</td>
<td>68</td>
<td>5
</td>
<td>77</td>
<td>1
</td>
<td>94</td>
<td>1
</td>
<td>154</td>
<td>1
</td></tr>
<tr>
<td>61</td>
<td>4
</td>
<td>69</td>
<td>3
</td>
<td>78</td>
<td>1
</td>
<td>104</td>
<td>2
</td>
<td rowspan="3" colspan="2">
</td></tr>
<tr>
<td>62</td>
<td>1
</td>
<td>70</td>
<td>4
</td>
<td>79</td>
<td>2
</td>
<td>106</td>
<td>1
</td></tr>
<tr>
<td>63</td>
<td>2
</td>
<td>71</td>
<td>2
</td>
<td>83</td>
<td>1
</td>
<td>109</td>
<td>1
</td></tr></tbody></table></dd></dl>
<p>The <a href="Cumulative_distribution_function" title="Cumulative distribution function">cumulative distribution function</a> (CDF) is shown below. Again, pixel values that do not contribute to an increase in the function are excluded for brevity.
</p>
<dl><dd><table class="wikitable">
<tbody><tr>
<th><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle v}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>v</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle v}</annotation>
</semantics>
</math></span><img src="./e07b00e7fc0847fbd16391c778d65bc25c452597.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.128ex; height:1.676ex;" alt="{\displaystyle v}" loading="lazy"></span>, Pixel Intensity</th>
<th><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {CDF} (v)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>CDF</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {CDF} (v)}</annotation>
</semantics>
</math></span><img src="./bb1457c6d88869818745541b4a45c4df4a726e27.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.908ex; height:2.843ex;" alt="{\displaystyle \operatorname {CDF} (v)}" loading="lazy"></span></th>
<th><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(v)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(v)}</annotation>
</semantics>
</math></span><img src="./5642c579b0a2d0271b1ecb418390f78902d5de45.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.276ex; height:2.843ex;" alt="{\displaystyle h(v)}" loading="lazy"></span>, equalized <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle v}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>v</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle v}</annotation>
</semantics>
</math></span><img src="./e07b00e7fc0847fbd16391c778d65bc25c452597.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.128ex; height:1.676ex;" alt="{\displaystyle v}" loading="lazy"></span>
</th></tr>
<tr>
<td>52</td>
<td>1</td>
<td>0
</td></tr>
<tr>
<td>55</td>
<td>4</td>
<td>12
</td></tr>
<tr>
<td>58</td>
<td>6</td>
<td>20
</td></tr>
<tr>
<td>59</td>
<td>9</td>
<td>32
</td></tr>
<tr>
<td>60</td>
<td>10</td>
<td>36
</td></tr>
<tr>
<td>61</td>
<td>14</td>
<td>53
</td></tr>
<tr>
<td>62</td>
<td>15</td>
<td>57
</td></tr>
<tr>
<td>63</td>
<td>17</td>
<td>65
</td></tr>
<tr>
<td>64</td>
<td>19</td>
<td>73
</td></tr>
<tr>
<td>65</td>
<td>22</td>
<td>85
</td></tr>
<tr>
<td>66</td>
<td>24</td>
<td>93
</td></tr>
<tr>
<td>67</td>
<td>25</td>
<td>97
</td></tr>
<tr>
<td>68</td>
<td>30</td>
<td>117
</td></tr>
<tr>
<td>69</td>
<td>33</td>
<td>130
</td></tr>
<tr>
<td>70</td>
<td>37</td>
<td>146
</td></tr>
<tr>
<td>71</td>
<td>39</td>
<td>154
</td></tr>
<tr>
<td>72</td>
<td>40</td>
<td>158
</td></tr>
<tr>
<td>73</td>
<td>42</td>
<td>166
</td></tr>
<tr>
<td>75</td>
<td>43</td>
<td>170
</td></tr>
<tr>
<td>76</td>
<td>44</td>
<td>174
</td></tr>
<tr>
<td>77</td>
<td>45</td>
<td>178
</td></tr>
<tr>
<td>78</td>
<td>46</td>
<td>182
</td></tr>
<tr>
<td>79</td>
<td>48</td>
<td>190
</td></tr>
<tr>
<td>83</td>
<td>49</td>
<td>194
</td></tr>
<tr>
<td>85</td>
<td>51</td>
<td>202
</td></tr>
<tr>
<td>87</td>
<td>52</td>
<td>206
</td></tr>
<tr>
<td>88</td>
<td>53</td>
<td>210
</td></tr>
<tr>
<td>90</td>
<td>54</td>
<td>215
</td></tr>
<tr>
<td>94</td>
<td>55</td>
<td>219
</td></tr>
<tr>
<td>104</td>
<td>57</td>
<td>227
</td></tr>
<tr>
<td>106</td>
<td>58</td>
<td>231
</td></tr>
<tr>
<td>109</td>
<td>59</td>
<td>235
</td></tr>
<tr>
<td>113</td>
<td>60</td>
<td>239
</td></tr>
<tr>
<td>122</td>
<td>61</td>
<td>243
</td></tr>
<tr>
<td>126</td>
<td>62</td>
<td>247
</td></tr>
<tr>
<td>144</td>
<td>63</td>
<td>251
</td></tr>
<tr>
<td>154</td>
<td>64</td>
<td>255
</td></tr></tbody></table> (Please note that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(v)=\operatorname {ceil} (\operatorname {CDF} (v))-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>ceil</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>CDF</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(v)=\operatorname {ceil} (\operatorname {CDF} (v))-1}</annotation>
</semantics>
</math></span><img src="./a846c668c3adfc508c503d3c3bd0ef2686d30cc4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.453ex; height:2.843ex;" alt="{\displaystyle h(v)=\operatorname {ceil} (\operatorname {CDF} (v))-1}" loading="lazy"></span> version is not illustrated yet.)</dd></dl>
<p>This CDF shows that the minimum value in the subimage is 52 and the maximum value is 154. The CDF of 64 for value 154 coincides with the number of pixels in the image. The CDF must be normalized to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [0,255]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>0</mn>
<mo>,</mo>
<mn>255</mn>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [0,255]}</annotation>
</semantics>
</math></span><img src="./0b92f49fdc420e36b9d62c711c3c6ebe7d9fcebc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.977ex; height:2.843ex;" alt="{\displaystyle [0,255]}" loading="lazy"></span>. The general histogram equalization formula is:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-1)\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">r</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">u</mi>
<mi mathvariant="normal">n</mi>
<mi mathvariant="normal">d</mi>
</mrow>
<mrow>
<mo>(</mo>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>CDF</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<msub>
<mi>CDF</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo movablelimits="true" form="prefix">min</mo>
</mrow>
</msub>
</mrow>
<mrow>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo>×<!-- × --></mo>
<mi>N</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<msub>
<mi>CDF</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo movablelimits="true" form="prefix">min</mo>
</mrow>
</msub>
</mrow>
</mfrac>
</mrow>
<mo>×<!-- × --></mo>
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-1)\right)}</annotation>
</semantics>
</math></span><img src="./4db888b4d695e56c720e6e211dc8ca9e0b99ceb3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:48.146ex; height:6.509ex;" alt="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-1)\right)}" loading="lazy"></span></dd></dl>
<p>where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {CDF} _{\min }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>CDF</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo movablelimits="true" form="prefix">min</mo>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {CDF} _{\min }}</annotation>
</semantics>
</math></span><img src="./8e6d2fec86fecbff6adc2d267b1a82e00a4742dc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.944ex; height:2.509ex;" alt="{\displaystyle \operatorname {CDF} _{\min }}" loading="lazy"></span> is the minimum non-zero value of the cumulative distribution function (in this case 1), <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M\times N}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>M</mi>
<mo>×<!-- × --></mo>
<mi>N</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle M\times N}</annotation>
</semantics>
</math></span><img src="./77b09b633429cadcb3f0ddeadc6dcbe7bd65fb13.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:7.346ex; height:2.176ex;" alt="{\displaystyle M\times N}" loading="lazy"></span> gives the image's number of pixels (for the example above 64, where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>M</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle M}</annotation>
</semantics>
</math></span><img src="./f82cade9898ced02fdd08712e5f0c0151758a0dd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.442ex; height:2.176ex;" alt="{\displaystyle M}" loading="lazy"></span> is width and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>N</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle N}</annotation>
</semantics>
</math></span><img src="./f5e3890c981ae85503089652feb48b191b57aae3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.064ex; height:2.176ex;" alt="{\displaystyle N}" loading="lazy"></span> the height) and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>L</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle L}</annotation>
</semantics>
</math></span><img src="./103168b86f781fe6e9a4a87b8ea1cebe0ad4ede8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.583ex; height:2.176ex;" alt="{\displaystyle L}" loading="lazy"></span> is the number of grey levels used (in most cases, like this one, 256).
</p><p><i>Note that to scale values in the original data that are above 0 to the range 1 to</i> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle L-1}</annotation>
</semantics>
</math></span><img src="./7fe61101dd489eb8e1a974ab6c409190a76541bc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.586ex; height:2.343ex;" alt="{\displaystyle L-1}" loading="lazy"></span><i>, inclusive, the above equation would instead be:</i>
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-2)\right)+1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">r</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">u</mi>
<mi mathvariant="normal">n</mi>
<mi mathvariant="normal">d</mi>
</mrow>
<mrow>
<mo>(</mo>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>CDF</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<msub>
<mi>CDF</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo movablelimits="true" form="prefix">min</mo>
</mrow>
</msub>
</mrow>
<mrow>
<mo stretchy="false">(</mo>
<mi>M</mi>
<mo>×<!-- × --></mo>
<mi>N</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<msub>
<mi>CDF</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo movablelimits="true" form="prefix">min</mo>
</mrow>
</msub>
</mrow>
</mfrac>
</mrow>
<mo>×<!-- × --></mo>
<mo stretchy="false">(</mo>
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>2</mn>
<mo stretchy="false">)</mo>
</mrow>
<mo>)</mo>
</mrow>
<mo>+</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-2)\right)+1}</annotation>
</semantics>
</math></span><img src="./e5d344dcf29fbbf9a55c370a2bf80aa3f8db1ca1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:52.149ex; height:6.509ex;" alt="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {CDF} (v)-\operatorname {CDF} _{\min }}{(M\times N)-\operatorname {CDF} _{\min }}}\times (L-2)\right)+1}" loading="lazy"></span></dd></dl>
<p><i>where cdf(v) > 0. Scaling from 1 to 255 preserves the non-zero-ness of the minimum value.</i>
</p><p>The equalization formula for the example scaling data from 0 to 255, inclusive, is:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {cdf} (v)-1}{63}}\times 255\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">r</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">u</mi>
<mi mathvariant="normal">n</mi>
<mi mathvariant="normal">d</mi>
</mrow>
<mrow>
<mo>(</mo>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>cdf</mi>
<mo><!-- --></mo>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mn>63</mn>
</mfrac>
</mrow>
<mo>×<!-- × --></mo>
<mn>255</mn>
</mrow>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {cdf} (v)-1}{63}}\times 255\right)}</annotation>
</semantics>
</math></span><img src="./6d6e19d15ca29a2cad47437cb75f3626ae8da6c4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:34.275ex; height:6.343ex;" alt="{\displaystyle h(v)=\mathrm {round} \left({\frac {\operatorname {cdf} (v)-1}{63}}\times 255\right)}" loading="lazy"></span></dd></dl>
<p>For example, the CDF of 78 is 46. (The value of 78 is used in the bottom row of the 7th column.) The normalized value becomes:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h(78)=\mathrm {round} \left({\frac {46-1}{63}}\times 255\right)=\mathrm {round} \left(0.714286\times 255\right)=182}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>h</mi>
<mo stretchy="false">(</mo>
<mn>78</mn>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">r</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">u</mi>
<mi mathvariant="normal">n</mi>
<mi mathvariant="normal">d</mi>
</mrow>
<mrow>
<mo>(</mo>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>46</mn>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mn>63</mn>
</mfrac>
</mrow>
<mo>×<!-- × --></mo>
<mn>255</mn>
</mrow>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">r</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">u</mi>
<mi mathvariant="normal">n</mi>
<mi mathvariant="normal">d</mi>
</mrow>
<mrow>
<mo>(</mo>
<mrow>
<mn>0.714286</mn>
<mo>×<!-- × --></mo>
<mn>255</mn>
</mrow>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mn>182</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle h(78)=\mathrm {round} \left({\frac {46-1}{63}}\times 255\right)=\mathrm {round} \left(0.714286\times 255\right)=182}</annotation>
</semantics>
</math></span><img src="./85c3e2b258f6d32cdbc8831753ca8d450b0e79ee.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:64.767ex; height:6.176ex;" alt="{\displaystyle h(78)=\mathrm {round} \left({\frac {46-1}{63}}\times 255\right)=\mathrm {round} \left(0.714286\times 255\right)=182}" loading="lazy"></span></dd></dl>
<p>Once this is done then the values of the equalized image are directly taken from the normalized CDF to yield the equalized values:
</p>
<table class="wikitable">
<tbody><tr>
<th style="background-color:#000000; color:#FFFFFF;">0
</th>
<th style="background-color:#0C0C0C; color:#FFFFFF;">12
</th>
<th style="background-color:#353535; color:#FFFFFF;">53
</th>
<th style="background-color:#202020; color:#FFFFFF;">32
</th>
<th style="background-color:#929292; color:#000000;">190
</th>
<th style="background-color:#353535; color:#FFFFFF;">53
</th>
<th style="background-color:#AEAEAE; color:#000000;">174
</th>
<th style="background-color:#353535; color:#FFFFFF;">53
</th></tr>
<tr>
<th style="background-color:#393939; color:#FFFFFF;">57
</th>
<th style="background-color:#202020; color:#FFFFFF;">32
</th>
<th style="background-color:#0C0C0C; color:#FFFFFF;">12
</th>
<th style="background-color:#E3E3E3; color:#000000;">227
</th>
<th style="background-color:#DBDBDB; color:#000000;">219
</th>
<th style="background-color:#CACACA; color:#000000;">202
</th>
<th style="background-color:#202020; color:#FFFFFF;">32
</th>
<th style="background-color:#9A9A9A; color:#000000;">154
</th></tr>
<tr>
<th style="background-color:#414141; color:#FFFFFF;">65
</th>
<th style="background-color:#555555; color:#FFFFFF;">85
</th>
<th style="background-color:#5D5D5D; color:#FFFFFF;">93
</th>
<th style="background-color:#EFEFEF; color:#000000;">239
</th>
<th style="background-color:#FBFBFB; color:#000000;">251
</th>
<th style="background-color:#E3E3E3; color:#000000;">227
</th>
<th style="background-color:#414141; color:#FFFFFF;">65
</th>
<th style="background-color:#9E9E9E; color:#000000;">158
</th></tr>
<tr>
<th style="background-color:#494949; color:#FFFFFF;">73
</th>
<th style="background-color:#929292; color:#000000;">146
</th>
<th style="background-color:#929292; color:#000000;">146
</th>
<th style="background-color:#F7F7F7; color:#000000;">247
</th>
<th style="background-color:#FFFFFF; color:#000000;">255
</th>
<th style="background-color:#EBEBEB; color:#000000;">235
</th>
<th style="background-color:#9A9A9A; color:#000000;">154
</th>
<th style="background-color:#828282; color:#000000;">130
</th></tr>
<tr>
<th style="background-color:#616161; color:#FFFFFF;">97
</th>
<th style="background-color:#A6A6A6; color:#000000;">166
</th>
<th style="background-color:#757575; color:#FFFFFF;">117
</th>
<th style="background-color:#E7E7E7; color:#000000;">231
</th>
<th style="background-color:#F3F3F3; color:#000000;">243
</th>
<th style="background-color:#D2D2D2; color:#000000;">210
</th>
<th style="background-color:#757575; color:#FFFFFF;">117
</th>
<th style="background-color:#757575; color:#FFFFFF;">117
</th></tr>
<tr>
<th style="background-color:#757575; color:#FFFFFF;">117
</th>
<th style="background-color:#BEBEBE; color:#000000;">190
</th>
<th style="background-color:#242424; color:#FFFFFF;">36
</th>
<th style="background-color:#BEBEBE; color:#000000;">146
</th>
<th style="background-color:#B2B2B2; color:#000000;">178
</th>
<th style="background-color:#5D5D5D; color:#FFFFFF;">93
</th>
<th style="background-color:#141414; color:#FFFFFF;">20
</th>
<th style="background-color:#AAAAAA; color:#000000;">170
</th></tr>
<tr>
<th style="background-color:#828282; color:#000000;">130
</th>
<th style="background-color:#CACACA; color:#000000;">202
</th>
<th style="background-color:#494949; color:#FFFFFF;">73
</th>
<th style="background-color:#141414; color:#FFFFFF;">20
</th>
<th style="background-color:#0C0C0C; color:#FFFFFF;">12
</th>
<th style="background-color:#353535; color:#FFFFFF;">53
</th>
<th style="background-color:#555555; color:#FFFFFF;">85
</th>
<th style="background-color:#C2C2C2; color:#000000;">194
</th></tr>
<tr>
<th style="background-color:#929292; color:#000000;">146
</th>
<th style="background-color:#CECECE; color:#000000;">206
</th>
<th style="background-color:#828282; color:#000000;">130
</th>
<th style="background-color:#757575; color:#FFFFFF;">117
</th>
<th style="background-color:#555555; color:#FFFFFF;">85
</th>
<th style="background-color:#A6A6A6; color:#000000;">166
</th>
<th style="background-color:#B6B6B6; color:#000000;">182
</th>
<th style="background-color:#D7D7D7; color:#000000;">215
</th></tr></tbody></table>
<p>Notice that the minimum value 52 is now 0 and the maximum value 154 is now 255.
</p>
<dl><dd><table>
<tbody><tr>
<td><span typeof="mw:File"></span>
</td>
<td><span typeof="mw:File"></span>
</td></tr>
<tr>
<td align="center">Original
</td>
<td align="center">Equalized
</td></tr></tbody></table></dd></dl>
<dl><dd><table>
<tbody><tr>
<td><span typeof="mw:File"></span>
</td>
<td><span typeof="mw:File"></span>
</td></tr>
<tr>
<td align="center">Histogram of Original image
</td>
<td align="center">Histogram of Equalized image
</td></tr></tbody></table></dd></dl>
<div class="mw-heading mw-heading3"><h3 id="Full-sized_image">Full-sized image</h3></div>
<table class="wikitable">
<tbody><tr valign="top">
<td>
</td>
<td>
</td></tr>
<tr valign="top">
<td>
</td>
<td>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Histogram_matching" title="Histogram matching">Histogram matching</a></li>
<li><a href="Adaptive_histogram_equalization" title="Adaptive histogram equalization">Adaptive histogram equalization</a></li>
<li><a href="Normalization_(image_processing)" title="Normalization (image processing)">Normalization (image processing)</a></li>
<li><a href="Digital_image_processing" title="Digital image processing">Digital image processing</a></li>
<li><a href="Image_segmentation" title="Image segmentation">Image segmentation</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFHumLaiMohamad_Salim2014" class="citation journal cs1">Hum, Yan Chai; Lai, Khin Wee; Mohamad Salim, Maheza Irna (October 11, 2014). "Multiobjectives bihistogram equalization for image contrast enhancement". <i>Complexity</i>. <b>20</b> (2): <span class="nowrap">22–</span>36. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/2014Cmplx..20b..22H">2014Cmplx..20b..22H</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2Fcplx.21499">10.1002/cplx.21499</a>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFLaughlin1981" class="citation journal cs1 cs1-prop-long-vol">Laughlin, S.B (1981). "A simple coding procedure enhances a neuron's information capacity". <i>Z. Naturforsch</i>. 9–10(36):910–2.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFIntel_Corporation2001" class="citation book cs1">Intel Corporation (2001). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150409155114/http://www.cs.unc.edu/~stc/FAQs/OpenCV/OpenCVReferenceManual.pdf"><i>Open Source Computer Vision Library Reference Manual</i></a> <span class="cs1-format">(PDF)</span>. Archived from <a rel="nofollow" class="external text" href="http://www.cs.unc.edu/~stc/FAQs/OpenCV/OpenCVReferenceManual.pdf">the original</a> <span class="cs1-format">(PDF)</span> on April 9, 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">January 11,</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20200601000000*/https://www.math.uci.edu/icamp/courses/math77c/demos/hist_eq.pdf">University of California, Irvine Math 77C - Histogram Equalization</a> at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a> (archived 2020-06-01<span style="font-size:100%" class="error citation-comment"><sup>(Calendar)</sup></span>)</span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFGonzalez2018" class="citation book cs1">Gonzalez, Rafael C. (2018). <i>Digital image processing</i>. Richard E. Woods (4th ed.). New York, NY: Pearson. pp. <span class="nowrap">138–</span>140. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-292-22304-9</bdi>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/991765590">991765590</a>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text">S. Naik and C. Murthy, "<a rel="nofollow" class="external text" href="https://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1257395">Hue-preserving color image enhancement without gamut problem</a>," IEEE Trans. Image Processing, vol. 12, no. 12, pp. 1591–1598, Dec. 2003</span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text">P. E. Trahanias and A. N. Venetsanopoulos, "<a rel="nofollow" class="external text" href="https://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=202045">Color image enhancement through 3-D histogram equalization</a>," in Proc. 15th IAPR Int. Conf. Pattern Recognition, vol. 1, pp. 545–548, Aug.-Sep. 1992.</span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text">N. Bassiou and C. Kotropoulos, "<a rel="nofollow" class="external text" href="http://www.sciencedirect.com/science/article/pii/S1077314206002141">Color image histogram equalization by absolute discounting back-off</a>," Computer Vision and Image Understanding, vol. 107, no. 1-2, pp.108-122, Jul.-Aug. 2007</span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFHanYangLee2011" class="citation journal cs1">Han, Ji-Hee; Yang, Sejung; Lee, Byung-Uk (2011). "A Novel 3-D Color Histogram Equalization Method with Uniform 1-D Gray Scale Histogram". <i>IEEE Transactions on Image Processing</i>. <b>20</b> (2): <span class="nowrap">506–</span>512. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/2011ITIP...20..506H">2011ITIP...20..506H</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTIP.2010.2068555">10.1109/TIP.2010.2068555</a>. <a href="PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/20801744">20801744</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:17972519">17972519</a>.</cite></span>
</li>
</ol></div></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */
.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}
/* end https://en.wikipedia.org/ */
</style><div class="refbegin" style="">
<ul><li>Acharya and Ray, <i>Image Processing: Principles and Applications</i>, Wiley-Interscience 2005 <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-471-71998-6</bdi></li>
<li>Russ, <i>The Image Processing Handbook: Fourth Edition</i>, CRC 2002 <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-8493-2532-3</bdi></li>
<li><a rel="nofollow" class="external text" href="http://www.generation5.org/content/2004/histogramEqualization.asp">"Histogram Equalization" at Generation5</a> <i>(<a rel="nofollow" class="external text" href="https://archive.today/20160516012012/http://www.generation5.org/content/2004/histogramEqualization.asp">archive</a>)</i></li></ul>
</div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-25" href="https://en.wikipedia.org/wiki/?title=Histogram_equalization&oldid=1302476190">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>